<template>
    <div style="text-align:center">
        <router-link to="/">去查找</router-link><br><br><br>
            <input type="text" v-model="gname" placeholder="请书写您要存储的关键字"><br><br><br>
        <textarea v-model="content" placeholder="请书写关键字对应的解析或用法" cols="50" rows="10"></textarea><br><br><br>
        <span @click="store" style="border:1px solid #CCC; padding:10px;">存储</span>
    </div>
</template>
<script>
import axios from '../axios/axios'
import {ref} from 'vue'
export default {
    setup() {
        let gname=ref(null)
        let content=ref(null)
        const store=()=>{
           let data={}
           data[gname.value]=content.value
            axios({
                method:'get',
                url:'/set',
                params:data
            })
        }
        return{
            gname,content,store
        }
    },
}
</script>